1. Field of the Invention
The present invention relates to an interface for connecting an output device such as a printer to an external equipment such as a host computer to construct a system for output processing.
2. Related Background Art
Conventionally, a Centronics interface devised by Centronics Inc. has been widely accepted as the standard interface for printers. In this interface, a signal from a host computer to a printer is constituted of an 8-bit parallel data signal, a STROBE signal for synchronization with data, and an INIT signal for initialization of printer. On the other hand, the status signal from printer to host computer is constituted of an ACKNLG signal, a BUSY signal (printer error), a PE (paper end) signal, an SLCT (select) signal, and an ERROR (printer error) signal. Also, a ground signal is provided as the common line. When a plurality of bytes are transferred from host computer to printer using this interface, the status signal is commonly checked, wherein if it is not BUSY, the data transfer for one byte is repeated by the number of bytes until the transfer of all data is completed. For the data transfer, the software of the host computer performs the operation of first setting data, setting the STROBE signal active in a certain time period or more, further holding it for another certain time period or more, and then setting it inactive. Also, data is necessary to be held for a certain time period or more after the STROBE signal is set inactive.
In addition, there is a printer interface using an SCSI (Small Computer System Interface). SCSI is a kind of parallel interface suitable for the fast communication with a large amount of data transmitted in near distance. The commands regarding printers are standardized.
Protocol for data transfer will be explained. SCSI is a bidirectional parallel interface with its protocol for data transfer defined. A protocol sequence thereof consists of several phases; a bus free phase, an arbitration phase, a selection phase, a command phase, a data phase, a status phase, a message phase, and a reselection phase. Bus free phase is a state in which none of the controllers use the bus. Arbitration phase is a phase for determining the using right of bus. Selection phase is a phase in which a controller having gained the using right of bus selects a partner to be controlled. Command phase is a phase for sending a command to an SCSI equipment (e.g., a printer). Data phase is a phase in which data is actually transferred. Status phase is a phase in which a command executed result is sent from a target to an initiator. The initiator is a host computer, for example, and the target is a printer, for example. Message phase is a phase for transferring information other than status. Reselection phase is a phase in which an equipment disconnected causes the controller to select itself again.
The operation starts with the bus free phase, and is performed by gaining the using right of bus in the arbitration phase, selecting an SCSI equipment (e.g., a printer) in the selection phase, transferring a command to the printer in the command phase, and then transferring actual print data in the data phase. In SCSI, the data transfer is achieved by transferring each block by the number of blocks designated by the command. The block transfer uses a DMA (Direct Memory Access).
Some host computers or word processors having a printer contained therein use an FIFO (First-In-First-Out) interface to allow for the data transfer up to the capacity of FIFO for the faster transmission of print data. Then, FIFO status is checked, in which if not BUSY, data can be written. Also, others take a configuration that an interrupt signal can be generated at predetermined times of 1/4, 1/2, 3/4 full or empty. Hence, if data is transferred one byte at a time, the operation of checking for the status and then writing data into FIFO is repeated. Also, if the interrupt signal is generated, for example, at every 1/2 empty, data up to half the capacity of FIFO can be stored without checking the status.
In the conventional example as above described, the data transfer from host computer to printer was performed in such a way that the status signal was checked every time of transferring one byte, in which if BUSY, the status was rechecked after waiting for a fixed time period, and upon becoming not BUSY, data was set, STROBE signal was sent and data of one byte was sent. Hence, there was a drawback that the transfer of one byte took more time, and if BUSY, the host computer spent a waiting time without operation, resulting in less efficient data transfer and print data creation. Also, it was necessary to generate the STROBE signal by software, which was an overhead for the host computer.
Also, when the SCSI was an used, there was additional drawback that a great overhead was incurred on the protocol for the practical data transfer via the SCSI interface, and the block transfer of data became inefficient because a great amount of time was consumed by CPU owing to the use of DMA. Also, note-type or lap-top type computers attaching importance to the portability had a problem that the hardware and cable for the SCSI was large, preventing the smaller construction.
Where the FIFO was used as the interface for the computer or word processor containing the printer therein, it was necessary to check the status for every one byte of data before writing the data, when the interrupt was not used, because the non-stored area was unknown although there was left a large non-stored area. On the other hand, when the interrupt was used, there was a problem that because the interrupt was generated only at predetermined times and could not be controlled to inhibit, frequent interrupts occurred in a balanced state near a determined empty size, when writing and reading were performed at the same time, resulting in a condition that could not be processed.